<template>
  <div class="formula">
    <div class="chance">
      <el-row :gutter="20">
        <el-col :span="22"
          ><el-alert
            title="对该页面的修改将在保存后立即生效，保存后重新核对数据，进行必要的上传和归档"
            :closable="false"
            type="warning"
            show-icon
          >
          </el-alert
        ></el-col>
        <el-col :span="2"
          ><el-button type="primary" @click="handleAdd">+添加公式</el-button></el-col
        >
      </el-row>
    </div>
    <el-table :data="grades">
      <el-table-column
        prop="gradeCode"
        label="公式名称"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="gradeName"
        label="公式类型"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="sort"
        label="结果设置"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="sort"
        label="保留小数位数后"
        align="center"
      ></el-table-column>
      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <span class="org-oper">
            <el-link
              size="mini"
              type="success"
              @click="handleCheck()"
              >查看</el-link
            >
            <el-link
              size="mini"
              type="primary"
              @click="handleEdit()"
              >修改</el-link
            >
            <el-link
              size="mini"
              type="danger"
              @click="handleDelete(scope.row)"
              v-hasPermi="['organization:grade:remove']"
              >删除</el-link
            >
          </span>
        </template>
      </el-table-column>
    </el-table>
    <add-formula :addDialog="addDialog" @close="closeAddDialog"></add-formula>
  </div>
</template>

<script>
import addFormula from './addFormula.vue';
export default {
  components: { addFormula },
  name: "basic",
  data() {
    return {
      addDialog: false,
      queryParams: {
        employeeCode: null,
        employeeName: null,
        employeeTel: null,
        employeeJoinStatus: null,
        employeeFormalStatus: null,
        employeeLeaveStatus: null,
        employeeRetiredStatus: null,
        current: 1, //当前页码
        size: 10, //每页显示数量
      },
      grades: [
        {
          gradeCode: "养老保险",
          gradeName: "12%",
          sort: "534元",
        },
        {
          gradeCode: "医疗保险",
          gradeName: "12%",
          sort: "534元",
        },
      ],
    };
  },
  methods: {
    handleAdd(){
      this.addDialog=true;
    },
    handleCheck(){
      this.addDialog=true;
    },
    handleEdit(){
      this.addDialog=true;
    },
    closeAddDialog(params){
      this.addDialog=params;
    }

  },
};
</script>

<style lang="scss" scoped>
.el-table {
  margin-top: 20px;
}
.el-tabs {
  margin: 0 20px;
}
.el-tabs__item {
  font-size: 16px;
  font-weight: bold;
}
.el-link {
  margin: 10px;
}

</style>

